﻿/// <reference path="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4-vsdoc.js" />

/*
JavaScript functions for the LiveTV.aspx page
*/
$(document).ready(function () {

    UpdateEncoderOutput();
});

function UpdateEncoderOutput() {

    // if the "Show encoder log" checkbox is checked, retrieve log from server
    if ($('input[id$=chkShowEncOutput]:first').attr('checked')) {

        CallWebMethod('LiveTV.aspx/GetEncoderLog', function (result) {
            $('#encOutput').html(result.d);
        });
    }

    // recall this function every 3000ms
    setTimeout(UpdateEncoderOutput, 3000);
}